<div class="easyui-layout" data-options="fit:true,border:false">
    <div data-options="region:'north',height:'auto',border:false" style="overflow:hidden;">
        <div class="searchIndex">
            <ul >
                <li>
                    <label>领用类型:</label>
                    <select class="easyui-combobox" name="orderStatus" data-options="panelHeight:'auto',editable:false,width:100">   
                        <option value="">所有</option>   
                        <option value="0">直接使用</option>
                        <option value="2">淘号</option>
                    </select> 
                </li>
                <li>
                    <label>状态:</label>
                    <select class="easyui-combobox" name="orderStatus" data-options="panelHeight:'auto',editable:false,width:100">   
                        <option value="">所有</option>   
                        <option value="0">已领用</option>
                        <option value="2">未领用</option>
                    </select> 
                </li>
                <li>
                    <label>关键字:</label>
                    <input class="base-input" name="orderNo" />
                </li>
                <li>
                    <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-searchWin8',plain:true">查询</a>
                </li>
            </ul>
        </div>
    </div>
    <div data-options="region:'center',border:false">
        <div id="exchangeCodeGridBtn" style="padding-left:10px;">
            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add-win8',plain:true" onClick="$('#addExchangeCode').dialog('open')">新增兑换码</a>
            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-removeWin8',plain:true" onClick="">批量删除</a>
            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-removeWin8',plain:true" onClick="">导入</a>
            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-removeWin8',plain:true" onClick="">导出</a>
        </div>
        <table class="easyui-datagrid" data-options="url:'../../json/replyEdit.asp',toolbar:'#exchangeCodeGridBtn',pagination:true,fit:true,autoRowHeight:false,rownumbers:true,border:false,fitColumns:true,nowrap:false,onDblClickRow:lookfactoryone,method:'get'">
            <thead>
                <tr>
                    <th data-options="field:'ck',checkbox:true"></th>
                    <th data-options="field:'orderNo',width:100,align:'center'">排序</th>
                    <th data-options="field:'giftName',width:100,align:'center'">礼包套餐名称</th>
                    <th data-options="field:'giftTime',width:200,align:'center'">礼包有效期</th>
                    <th data-options="field:'exchangeCode',width:100,align:'center'">兑换码</th>
                    <th data-options="field:'receiveType',width:100,align:'center'">领用类型</th>
                    <th data-options="field:'receiveStatus',width:100,align:'center'">状态</th>
                    <th data-options="field:'huntNum',width:100,align:'center'">淘号次数</th>
                    <th data-options="field:'11',width:200,align:'center',formatter:ExchangeCode.gameFormatter">操作</th>
                </tr>
            </thead>
        </table>
    </div>
</div>

<!-- 新增兑换码 -->
<div id="addExchangeCode" class="easyui-dialog" data-options="title:'新增兑换码',closable:true,closed:true,modal:true,width:320,height:250,buttons:'#addExchangeCodeBtn'">
    <div class="con_form">
        <ul >
            <li>
                <label>礼包套餐名称:</label>
                <input class="base-input" name="orderNo" />
            </li>
            <li>
                <label>领用类型:</label>
                <select class="easyui-combobox" name="orderStatus" data-options="panelHeight:'auto',editable:false,width:170">   
                    <option value="0">直接使用</option>
                    <option value="2">淘号</option>
                </select> 
            </li>
            <li>
                <label>兑换码:</label>
                <input class="base-input" name="orderNo" />
            </li>
        </ul>
    </div>
    <div id="addExchangeCodeBtn">
        <center>
            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-filesavewin8'" onClick="$.messager.alert('提示','保存成功！','info');">保存</a>
            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-closeWin8'" onClick="$('#addExchangeCode').dialog('close')">取消</a>
        </center>
    </div>
</div>
<!-- 编辑兑换码 -->
<div id="editExchangeCode" class="easyui-dialog" data-options="title:'编辑兑换码',closable:true,closed:true,modal:true,width:320,height:250,buttons:'#editExchangeCodeBtn'">
    <div class="con_form">
        <ul >
            <li>
                <label>礼包套餐名称:</label>
                <input class="base-input" name="orderNo" value="【欢乐斗地主】新手礼包" />
            </li>
            <li>
                <label>领用类型:</label>
                <select class="easyui-combobox" name="orderStatus" data-options="panelHeight:'auto',editable:false,width:170">   
                    <option value="0">直接使用</option>
                    <option value="2">淘号</option>
                </select> 
            </li>
            <li>
                <label>兑换码:</label>
                <input class="base-input" name="orderNo" value="XXXXXXXXXX" />
            </li>
        </ul>
    </div>
    <div id="editExchangeCodeBtn">
        <center>
            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-filesavewin8'" onClick="$.messager.alert('提示','保存成功！','info');">保存</a>
            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-closeWin8'" onClick="$('#editExchangeCode').dialog('close')">取消</a>
        </center>
    </div>
</div>
<script type="text/javascript">
    ;(function($,window, ExchangeCode){
        // 格式化datagrid(修改最后一列数据为详情)
        ExchangeCode.gameFormatter = function (value, row, rowIndex) {
            return "<a href='javascript:void(0);' style='color:blue;' onclick='$(\"#editExchangeCode\").dialog(\"open\");'>编辑</a><a href='javascript:void(0);' style='color:blue;margin-left:10px;' onclick=''>删除</a>";
        };
    })(jQuery,window, window.ExchangeCode = {});

</script>